<!-- src/App.vue -->
<template>
    <routerView></routerView>
</template>

<script  setup>
import { onMounted, ref } from 'vue';
import router from './router';
let userId = ref('')
userId.value = localStorage.getItem('userId')
if(!userId.value){
  alert('还没登录，先登录吧~')
  router.push('/login')
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  /* margin-top: 60px; */
  text-align: center;
}

.el-header {
  background-color: #fff;
  color: #333;
  line-height: 60px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  padding: 0 20px;
}

.el-main {
  background-color: #f5f7fa;
  color: #333;
  padding: 20px;
  flex: 1;
}
</style>